<?php

use think\migration\Migrator;
use think\migration\db\Column;

class AlterCouponOrderAddTemplateId extends Migrator
{
    public function up()
    {

        $this->table('coupon_order')
            ->addColumn('template_id', 'integer', ['limit' => 11, 'default' => 0, 'comment' => '模板id 冗余字段，插入时自动完成'])
            ->update();


    }

    public function down()
    {
        $this->table('coupon_order')->removeColumn('template_id');
    }
}
